import React from 'react';
import ReactDOM from 'react-dom';
const fs = require('fs');
const path = require('path');
// console.log(path);
function fileExist(p) {
  if (fs.existsSync(p)) {
    return true;
  }
  return false;
}
function link(where, module_name) {
  // body...
  var thelink = document.createElement('link');
  thelink.setAttribute('rel', 'stylesheet');
  var file1 = path.join(where, module_name);
  thelink.setAttribute('href', file1);
  document.head.appendChild(thelink);
}
function getWhere() {
  let path = window.require('electron').ipcRenderer.sendSync('getpath');
  return path;
}
let where = getWhere();
console.log(where);
let module_name = './Home_new';

let App = require(module_name).default;
ReactDOM.render(<App />, document.getElementById('content'));
